package passwordCheckerPrimeiraIteracao.testes;

import static org.junit.Assert.assertEquals;

import java.util.Arrays;
import java.util.Collection;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

import passwordCheckerPrimeiraIteracao.PasswordCheckerBasePrimeiraIteracao;

@RunWith(Parameterized.class)
public class CheckIfAtLeastOneLowercaseLetterTest {
	private Boolean expectedAnswer;
	private String inputPassword;

	public CheckIfAtLeastOneLowercaseLetterTest(String pInputPassword,
			Boolean pExpectedAnswer) {
		this.inputPassword = pInputPassword;
		this.expectedAnswer = pExpectedAnswer;
	}

	@Parameterized.Parameters
	public static Collection symbolValidation() {
		return Arrays.asList(new Object[][] { { "luiz", true },
				{ "LUIZ", false }, { "Luiz", true }, { "LUIz", true },
				{ "123", false } });
	}

	@Test
	public void LowercaseValidation() {
		assertEquals(Boolean.valueOf(expectedAnswer),
				Boolean.valueOf((PasswordCheckerBasePrimeiraIteracao
						.checkIfAtLeastOneLowercaseLetter(inputPassword))));
	}
}
